﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/admin/list_view_debug.master" %>

<script runat="server">
    void Page_Init(object o, EventArgs e)
    {
        if (null != Session["BranchID"])
        {
            ds2.FilterExpression = string.Format("BranchID={0}", Session["BranchID"]);
        }
        else
        {
            ds2.FilterExpression = string.Format("BranchID={0}", 0);
        }
        if (!IsPostBack)
        {
            ds2.FilterExpression = string.Format("BranchID={0}", 0);
        }
    }

    void Page_Load(object o, EventArgs e)
    {
        if (!IsPostBack)
        {
           // grid1.FocusedRowIndex = -1;

        }
    }
    
    
    
    void clickme(object o, EventArgs e)
    {
        //System.Threading.Thread.Sleep(5000);
       // mylabel.Text = "click alrady";
       // timerbox.Text = DateTime.Now.ToString();
        
    }

    void MakeChanged(Object sender,  EventArgs e)
    {
        ASPxGridView grid = sender as ASPxGridView;

        int t = grid.FocusedRowIndex;
        if (t > -1)
        {
            object id = grid.GetRowValues(t, new string[] { "BranchID" });
            //object name = grid.GetRowValues(t, new string[] { "Name" });
            // mylabel.Text = "Selection:" + id.ToString();
            
            Session["BranchID"] = id;
            int idn = int.Parse(id.ToString());
            if (idn > 0)
            {
                ds2.FilterExpression = string.Format("BranchID={0}", Session["BranchID"]);

                grid2.Selection.UnselectAll();
                grid2.PageIndex = 0;
                grid2.DataBind();
                grid2.StartEdit(0);
            } 
            
            
            
            
            
            
            //this.dsXXModel.FilterExpression = "BranchID=" + o;
            //DataBind();
        }
    }


    protected void grid2_Init(object sender, EventArgs e)
    {
        ASPxGridView grd = sender as ASPxGridView;
        if (grd != null)
        {
            grd.ForceDataRowType(typeof(Touchmax.BoBranch));
        }
    }

    protected void grid2_InitNewRow(object sender, DevExpress.Web.Data.ASPxDataInitNewRowEventArgs e)
    {
    }

    protected void grid2_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
    {
        //ASPxComboBox cbTime1 = this.grid2.FindEditFormTemplateControl("cbTime1") as ASPxComboBox;
        //ASPxComboBox cbTime2 = this.grid2.FindEditFormTemplateControl("cbTime2") as ASPxComboBox;
        //ASPxComboBox cbWorkDay = this.grid2.FindEditFormTemplateControl("cbWorkDay") as ASPxComboBox;
        //e.NewValues["WorkTime1"] = cbTime1.Text;
        //e.NewValues["WorkTime2"] = cbTime2.Text; 
        //e.NewValues["WorkDay"] = int.Parse(cbWorkDay.Text);
    }

    protected void grid2_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        //ASPxComboBox cbTime1 = this.grid2.FindEditFormTemplateControl("cbTime1") as ASPxComboBox;
        //ASPxComboBox cbTime2 = this.grid2.FindEditFormTemplateControl("cbTime2") as ASPxComboBox;
        //ASPxComboBox cbWorkDay = this.grid2.FindEditFormTemplateControl("cbWorkDay") as ASPxComboBox;
        //e.NewValues["WorkTime1"] = cbTime1.Text;
        //e.NewValues["WorkTime2"] = cbTime2.Text;
        //e.NewValues["WorkDay"] = int.Parse(cbWorkDay.Text);
 
    }

    
    </script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style>
    div {font-size:10px;font-family:Verdana;}
    </style>
    <script type="text/javascript">
    </script>
</asp:Content>

<asp:Content ID="title1" ContentPlaceHolderID="Title1" Runat="Server">
<table width=100% cellpadding="4">
    <tr>
    <td align=left class="bb">
        Branch List
    </td>
    <td align=right class="bb">
    </td>
    </tr>
</table>
</asp:Content>
<asp:Content ID="title2" ContentPlaceHolderID="Title2" Runat="Server">
<table width=100% cellpadding="4">
    <tr>
    <td align=left class="bb">
        Branch Setup
    </td>
    <td align=right class="bb">
       
    </td>
    </tr>
</table>
</asp:Content>
<asp:Content ID="title3" ContentPlaceHolderID="Title3" Runat="Server">

</asp:Content>

<asp:Content ID="Page1" ContentPlaceHolderID="Page1" Runat="Server">
<wilson:DataSource ID="ds1" TypeName="Touchmax.BoBranch" KeyMember="BranchID" FilterExpression="1=1" runat="server" ObjectSpace="Touchmax.Manager.ORManager"/>
<dxwgv:ASPxGridView ID="grid1" ClientInstanceName="grid1" runat="server" DataSourceID="ds1" KeyFieldName="BranchID" 
       OnFocusedRowChanged="MakeChanged" Width="100%" AutoGenerateColumns="False" EnableCallBacks="False">
                <SettingsPager Mode="ShowAllRecords"/>
                <Columns>
                    <dxwgv:GridViewDataColumn FieldName="BranchName" VisibleIndex="1" SortIndex="1" SortOrder="Descending">
                    </dxwgv:GridViewDataColumn>
                </Columns>
                <Settings ShowGroupPanel="False" ShowFooter="False" ShowTitlePanel="false" ShowColumnHeaders="False" />
                <SettingsBehavior AllowMultiSelection="false" AllowFocusedRow="true" ProcessFocusedRowChangedOnServer="true" />
            </dxwgv:ASPxGridView>
</asp:Content>
<asp:Content ID="Page2" ContentPlaceHolderID="Page2" Runat="Server">

<asp:SqlDataSource ID="dsPickColorFormular"	SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1001 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickColorMatch" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1002 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickMarketingSource" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1003 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickOrderStatus" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1004 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickColorOption" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1005 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickDepartment" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1006 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickWorkType" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1007 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickWorkLocation" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1008 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickServiceType" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1009 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickRepairStatus" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1010 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickCustomerGroup" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1011 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickPrimaryColor" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1012 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickBranchGroupID" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1013 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="SqlDataSource1" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1014 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickPhoneType" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1015 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickBranchStatusID" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1016 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickEmploymentStatusID" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1017 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickPaymentTerm" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1018 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickVehicleYear" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1019 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickPaymentMethod" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1020 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickCallProcess" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1021 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickCallStatus" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1022 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />


<asp:SqlDataSource ID="dsPickCountry" SelectCommand="select * from ddCountry order by countryname" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickState" SelectCommand="select * from ddState where countrycode='CA' order by statename" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickCity" SelectCommand="select * from ddCity where statecode='BC' order by statename" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickZoneCode" SelectCommand="select distinct zonecode from ddPostal order by zonename" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />


<asp:SqlDataSource ID="dsPickRoleID" SelectCommand="select RoleName as Code, RoleID as Id from acRole" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<asp:SqlDataSource ID="dsPickEmployeeGroupID" SelectCommand="select ddItemCode as Code, ddItemId as Id from ddItems where ddItemStatus='Active' and ddGroupId=1014 order by ddItemSort" runat="server" ConnectionString="Server=.\Sqlexpress;DataBase=colorworksDB;UID=sa;PWD=1234;"  />
<wilson:DataSource ID="dsBranch" TypeName="Touchmax.BoBranch" KeyMember="BranchID" FilterExpression="1=1" runat="server" ObjectSpace="Touchmax.Manager.ORManager"/>
<wilson:DataSource ID="dsCombo" TypeName="Touchmax.FaItem" KeyMember="ItemID" FilterExpression="1=1" runat="server" ObjectSpace="Touchmax.Manager.ORManager"/>
<wilson:DataSource ID="ds2" TypeName="Touchmax.BoBranch" KeyMember="BranchID" FilterExpression="BranchID=0" runat="server" ObjectSpace="Touchmax.Manager.ORManager"/>
<dxwgv:ASPxGridView ID="grid2" ClientInstanceName="grid2" runat="server" DataSourceID="ds2" KeyFieldName="BranchID" 
        Width="100%" AutoGenerateColumns="False"  EnableCallBacks="False" OnInit="grid2_Init" OnInitNewRow="grid2_InitNewRow" OnRowUpdating="grid2_RowUpdating" OnRowInserting="grid2_RowInserting">
                <SettingsPager Mode="ShowAllRecords"/>
                <Columns>
                    <dxwgv:GridViewCommandColumn VisibleIndex="0" Width="80">
                        <EditButton Visible="True" />
                    </dxwgv:GridViewCommandColumn>           
                    <dxwgv:GridViewDataDateColumn Caption="Branch Code" FieldName="BranchCode" VisibleIndex="1"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Branch Name" FieldName="BranchName" VisibleIndex="2"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Last Name" FieldName="Contact" VisibleIndex="3"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Phone" FieldName="Phone1" VisibleIndex="4"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Fax" FieldName="Fax" VisibleIndex="5"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Email" FieldName="Email" VisibleIndex="6"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Work From" FieldName="WorkTime1" VisibleIndex="7"></dxwgv:GridViewDataDateColumn>
                    <dxwgv:GridViewDataDateColumn Caption="Work To" FieldName="WorkTime2" VisibleIndex="8"></dxwgv:GridViewDataDateColumn>
                                   
                    </Columns>
                    <Templates>
                    <EditForm>
 <table cellspacing=4>
<table>
<tr>
<td class="tdLabel">BranchCode</td><td class="tdInput"><dxe:ASPxTextBox ID="text_BranchCode" ClientInstanceName="text_BranchCode" Readonly="False" cssClass="txtInput" Text='<%# Bind("BranchCode") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">&nbsp;</td><td class="tdInput">&nbsp;</td>
<td class="tdLabel">Branch Type</td><td class="tdInput"><dxe:ASPxComboBox ID="pick_BranchGroupID" ClientInstanceName="pick_BranchGroupID" Readonly="False" cssClass="txtCombo" Text='<%# Bind("BranchGroup") %>' DataSourceID="dsPickBranchGroupID" ValueField="Code" TextField="Code" TabIndex="0" runat="server" ></dxe:ASPxComboBox></td>
</tr>
<tr>
<td colspan=6 style="height:2px;margin:10px;border-bottom:solid 2px gray;"></td>
</tr>
<tr>
<td class="tdLabel">Branch Name</td><td class="tdInput" colspan=3><dxe:ASPxTextBox width="250" ID="text_BranchName" ClientInstanceName="text_BranchName" Readonly="False" cssClass="txtInput" Text='<%# Bind("BranchName") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">&nbsp;</td><td class="tdInput">&nbsp;</td>
</tr>
<tr>
<td class="tdLabel">Company Name</td><td class="tdInput" colspan=3><dxe:ASPxTextBox width="250" ID="text_CompanyName" ClientInstanceName="text_CompanyName" Readonly="False" cssClass="txtInput" Text='<%# Bind("CompanyName") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">&nbsp;</td><td class="tdInput">&nbsp;</td>
</tr>
<tr>
<td class="tdLabel">Address</td><td class="tdInput" colspan=5>
<dxe:ASPxTextBox ID="text_Address1" Width="400" ClientInstanceName="text_Address1" Readonly="False" cssClass="txtInput" Text='<%# Bind("Address1") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox>
<br />
<dxe:ASPxTextBox ID="text_Address2" Width="400" ClientInstanceName="text_Address2" Readonly="False" cssClass="txtInput" Text='<%# Bind("Address2") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox>
<br />
</tr>
<tr>
<td class="tdLabel">City</td><td class="tdInput"><dxe:ASPxTextBox ID="text_CityName" ClientInstanceName="text_CityName" Readonly="False" cssClass="txtInput" Text='<%# Bind("CityName") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Province</td><td class="tdInput"><dxe:ASPxTextBox ID="text_StateCode" ClientInstanceName="text_StateCode" Readonly="False" cssClass="txtInput" Text='<%# Bind("StateCode") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Postal Code</td><td class="tdInput"><dxe:ASPxTextBox ID="text_PostalCode" ClientInstanceName="text_PostalCode" Readonly="False" cssClass="txtInput" Text='<%# Bind("PostalCode") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
</tr>
<tr>
<td class="tdLabel">Phone1</td><td class="tdInput"><dxe:ASPxTextBox ID="text_Phone1" ClientInstanceName="text_Phone1" Readonly="False" cssClass="txtInput" Text='<%# Bind("Phone1") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Phone2</td><td class="tdInput"><dxe:ASPxTextBox ID="text_Phone2" ClientInstanceName="text_Phone2" Readonly="False" cssClass="txtInput" Text='<%# Bind("Phone2") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Fax</td><td class="tdInput"><dxe:ASPxTextBox ID="text_Fax" ClientInstanceName="text_Fax" Readonly="False" cssClass="txtInput" Text='<%# Bind("Fax") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
</tr>
<tr>
<td class="tdLabel">Contact</td><td class="tdInput"><dxe:ASPxTextBox ID="text_Contact" ClientInstanceName="text_Contact" Readonly="False" cssClass="txtInput" Text='<%# Bind("Contact") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Email</td><td class="tdInput"><dxe:ASPxTextBox ID="text_Email" ClientInstanceName="text_Email" Readonly="False" cssClass="txtInput" Text='<%# Bind("Email") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Website</td><td class="tdInput"><dxe:ASPxTextBox ID="text_Website" ClientInstanceName="text_Website" Readonly="False" cssClass="txtInput" Text='<%# Bind("Website") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
</tr>
<tr>
<td colspan=6 style="height:2px;margin:10px;border-bottom:solid 2px gray;"></td>
</tr>
<tr>
<td class="tdLabel">Business#</td><td class="tdInput"><dxe:ASPxTextBox ID="text_BusinessNo" ClientInstanceName="text_BusinessNo" Readonly="False" cssClass="txtInput" Text='<%# Bind("BusinessNo") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">Tax#</td><td class="tdInput"><dxe:ASPxTextBox ID="text_TaxNo" ClientInstanceName="text_TaxNo" Readonly="False" cssClass="txtInput" Text='<%# Bind("TaxNo") %>' TabIndex="0" runat="server" ></dxe:ASPxTextBox></td>
<td class="tdLabel">&nbsp;</td><td class="tdInput">&nbsp;</td>
</tr>
<tr>
<td colspan=6 style="height:2px;margin:10px;border-bottom:solid 2px gray;"></td>
</tr>
<tr>
<td class="tdLabel">Working Time Start</td><td class="tdInput">

                                <dxe:ASPxComboBox ID="cbTime1" Width="100" runat="server" Text='<%# Bind("WorkTime1") %>'  TabIndex="12">
                                    <Items>
                                    <dxe:ListEditItem Text="08:00" />
                                    <dxe:ListEditItem Text="08:30" />
                                    <dxe:ListEditItem Text="09:00" />
                                    <dxe:ListEditItem Text="09:30" />
                                    <dxe:ListEditItem Text="10:00" />
                                    <dxe:ListEditItem Text="10:30" />
                                    <dxe:ListEditItem Text="11:00" />
                                    <dxe:ListEditItem Text="11:30" />
                                    <dxe:ListEditItem Text="12:00" />
                                    <dxe:ListEditItem Text="12:30" />
                                    <dxe:ListEditItem Text="13:00" />
                                    <dxe:ListEditItem Text="13:30" />
                                    <dxe:ListEditItem Text="14:00" />
                                    <dxe:ListEditItem Text="14:30" />
                                    <dxe:ListEditItem Text="15:00" />
                                    <dxe:ListEditItem Text="15:30" />
                                    <dxe:ListEditItem Text="16:00" />
                                    <dxe:ListEditItem Text="16:30" />
                                    <dxe:ListEditItem Text="17:00" />
                                    <dxe:ListEditItem Text="17:30" />
                                    <dxe:ListEditItem Text="18:00" />
                                    </Items>
                                </dxe:ASPxComboBox>


</td>
<td class="tdLabel">Working Time End</td><td class="tdInput">

                                <dxe:ASPxComboBox ID="cbTime2" Width="100" runat="server" Text='<%# Bind("WorkTime2") %>'  TabIndex="12">
                                    <Items>
                                    <dxe:ListEditItem Text="08:00" />
                                    <dxe:ListEditItem Text="08:30" />
                                    <dxe:ListEditItem Text="09:00" />
                                    <dxe:ListEditItem Text="09:30" />
                                    <dxe:ListEditItem Text="10:00" />
                                    <dxe:ListEditItem Text="10:30" />
                                    <dxe:ListEditItem Text="11:00" />
                                    <dxe:ListEditItem Text="11:30" />
                                    <dxe:ListEditItem Text="12:00" />
                                    <dxe:ListEditItem Text="12:30" />
                                    <dxe:ListEditItem Text="13:00" />
                                    <dxe:ListEditItem Text="13:30" />
                                    <dxe:ListEditItem Text="14:00" />
                                    <dxe:ListEditItem Text="14:30" />
                                    <dxe:ListEditItem Text="15:00" />
                                    <dxe:ListEditItem Text="15:30" />
                                    <dxe:ListEditItem Text="16:00" />
                                    <dxe:ListEditItem Text="16:30" />
                                    <dxe:ListEditItem Text="17:00" />
                                    <dxe:ListEditItem Text="17:30" />
                                    <dxe:ListEditItem Text="18:00" />
                                    </Items>
                                </dxe:ASPxComboBox>
</td>
<td class="tdLabel">Working Days</td><td class="tdInput">
<dxe:ASPxComboBox ID="cbWorkDay" ClientInstanceName="cbWorkDay" Readonly="False" cssClass="txtCombo" Text='<%# Bind("WorkDay") %>' TabIndex="12" runat="server" >
    <Items>
    <dxe:ListEditItem Text="1" />
    <dxe:ListEditItem Text="2" />
    <dxe:ListEditItem Text="3" />
    <dxe:ListEditItem Text="4" />
    <dxe:ListEditItem Text="5" />
    <dxe:ListEditItem Text="6" />
    <dxe:ListEditItem Text="7" />
    </Items>
</dxe:ASPxComboBox></td>
</tr>
<tr>
<td colspan=6 style="height:2px;margin:10px;border-bottom:solid 2px gray;"></td>
</tr>
<tr>
<td class="tdLabel">Date From</td><td class="tdInput"><dxe:ASPxDateEdit ID="date_DateFrom" ClientInstanceName="date_DateFrom" Readonly="False" cssClass="txtInput" value='<%# Bind("DateFrom") %>' EditFormat="Custom" EditFormatString="dd/MM/yyyy" DisplayFormatString="dd/MM/yyyy" TabIndex="0" runat="server" ></dxe:ASPxDateEdit></td>
<td class="tdLabel">Date To</td><td class="tdInput"><dxe:ASPxDateEdit ID="date_DateTo" ClientInstanceName="date_DateTo" Readonly="False" cssClass="txtInput" value='<%# Bind("DateTo") %>' EditFormat="Custom" EditFormatString="dd/MM/yyyy" DisplayFormatString="dd/MM/yyyy" TabIndex="0" runat="server" ></dxe:ASPxDateEdit></td>
<td class="tdLabel">Status</td><td class="tdInput"><dxe:ASPxComboBox ID="pick_BranchStatusID" ClientInstanceName="pick_BranchStatusID" Readonly="False" cssClass="txtCombo" Text='<%# Bind("BranchStatus") %>' DataSourceID="dsPickBranchStatusID" ValueField="Code" TextField="Code" TabIndex="0" runat="server" ></dxe:ASPxComboBox></td>
</tr>
<tr>
<td colspan=6 style="height:2px;margin:10px;border-bottom:solid 2px gray;"></td>
</tr>
<tr>
<td colspan=6 align="right"><br />
                <dxe:ASPxButton ID="btn_Save1" Width="90" runat="server" Text="Save Branch" AutoPostBack="false"
                                    UseSubmitBehavior="false">
                                    <ClientSideEvents Click="function(s,e) {
                                                           grid2.UpdateEdit();
                                                        }" />
                                </dxe:ASPxButton>
                </td></tr></table>

</td>
</table>
                    

                    </EditForm>
                    </Templates>

                    <SettingsEditing Mode="EditForm" />
      
                <Settings ShowGroupPanel="False" ShowFooter="False" ShowTitlePanel="false" ShowColumnHeaders="True" />
                <SettingsBehavior ConfirmDelete="True" AllowFocusedRow="true" ProcessFocusedRowChangedOnServer="true" />
            </dxwgv:ASPxGridView>
</asp:Content>
<asp:Content ID="Page3" ContentPlaceHolderID="Page3" Runat="Server">
</asp:Content>

